// JavaScript Document
function clearField(x) {
  if (x.value == x.defaultValue) {
         x.value = "";
     }
}

function returnDefault(y) {
	if (y.value == "") {
		y.value = y.defaultValue;
	}
}

function fixSize() {
	var height = document.body.clientHeight - 89;
	document.getElementById("container").style.height = height + "px";
	
	var width = document.body.clientWidth - 227;
	document.getElementById("content_container").style.width = width + "px";
}

function previewPatch() {
	window.open("preview.php", "previewPatch", "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=500,left=470,top =200");	
}

function loadPreview() {
	document.getElementById("textfield").innerHTML = parent.opener.document.getElementById("notice").value
}